/*
 * @Author: lxc
 * @Date: 2020-10-10 15:28:50
 * @LastEditTime: 2020-12-23 20:09:48
 * @LastEditors: lxc
 * @Description: In User Settings Edit
 * @FilePath: \vue3.0-demo\src\api\index.js
 */
import { request } from '../utils/axios';
export function registers(data: any) {
    return request({
        url: '/api/users/register',
        method: 'post',
        data
    })
}
export function logins(data: any) {
    return request({
        url: '/api/users/login',
        method: 'post',
        data
    })
}
export function current(data: any) {
    return request({
        url: '/api/users/current',
        method: 'get',
        data
    })
}
// 获取分类列表
export function getClassifyList(data: any) {
    return request({
        url: '/api/classify/getClassifyList',
        method: 'get',
        params: data
    })
}
// 编辑分类
export function addEidtClassify(data: any) {
    return request({
        url: '/api/classify/addEidtClassify',
        method: 'post',
        data
    })
}
// 删除分类
export function delClassify(data: any) {
    return request({
        url: '/api/classify/delClassify',
        method: 'delete',
        data
    })
}

// 获取开销列表
export function getOrderList(data: any) {
    return request({
        url: '/api/orders/getOrderList',
        method: 'get',
        params: data
    })
}

// 新增开销订单
export function addOrders(data: any) {
    return request({
        url: '/api/orders/addOrders',
        method: 'post',
        data
    })
}

// 删除开销
export function delOrder(data: any) {
    return request({
        url: '/api/orders/delOrder',
        method: 'delete',
        data
    })
}

// 编辑开销订单
export function eidtOrder(data: any) {
    return request({
        url: '/api/orders/eidtOrder',
        method: 'post',
        data
    })
}



